/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const financeRouter = {
  path: '/finance',
  component: Layout,
  redirect: '/finance/base_info/account_title',
  name: 'finance',
  meta: {
    title: '财务管理',
  },
  children: [
    {
      path: 'base_info',
      component: () => import('@/views/finance/baseinfo/index'), // Parent router-view
      name: 'BaseInfo',
      meta: { title: '基础资料' },
      redirect: '/finance/baseinfo/account_title',
      children: [
        {
          path: 'code',
          component: () => import('@/views/finance/baseinfo/code/'),
          name: 'AccountCode',
          meta: { title: '会计编码' }
        },
        {
          path: 'account_title',
          component: () => import('@/views/finance/baseinfo/account/index'),
          name: 'AccountTitle',
          meta: { title: '会计科目' }
        },
        {
          path: 'employee_info',
          component: () => import('@/views/finance/baseinfo/employee/index'),
          name: 'Empolyee',
          meta: { title: '员工信息' },
        },
        {
          path: 'customer_info',
          component: () => import('@/views/finance/baseinfo/customer/index'),
          name: 'Customer',
          meta: { title: '客户信息' }
        },
        {
          path: 'bank_info',
          component: () => import('@/views/finance/baseinfo/bank/index'),
          name: 'Bank',
          meta: { title: '银行信息' }
        },
        {
          path: 'rule',
          component: () => import('@/views/finance/baseinfo/rule/index'),
          name: 'Rule',
          meta: { title: '利润分配规则' }
        },
        {
          path: 'init',
          component: () => import('@/views/finance/baseinfo/init/index'),
          name: 'Initial',
          meta: { title: '初始创建' }
        }
      ]
    },
    {
      path: 'sale',
      component: () => import('@/views/finance/sale/index'),
      name: 'Sale',
      meta: { title: '销售单' }
    },
    {
      path: 'receipt',
      component: () => import('@/views/finance/receipt/index'),
      name: 'Receipt',
      meta: { title: '收款单' }
    },
    {
      path: 'expense',
      component: () => import('@/views/finance/expense/index'),
      name: 'Expense',
      meta: { title: '收费单' }
    },
    {
      path: 'income',
      component: () => import('@/views/finance/income/index'),
      name: 'Income',
      meta: { title: '其他收入' }
    },
    {
      path: 'borrow',
      component: () => import('@/views/finance/borrow/'),
      name: 'Borrow',
      meta: { title: '资金借入' }
    },
    {
      path: 'lend',
      component: () => import('@/views/finance/lend/'),
      name: 'Lend',
      meta: { title: '资金借出' }
    },
    {
      path: 'payment',
      component: () => import('@/views/finance/pay/index'),
      name: 'Payment',
      meta: { title: '付款单' }
    },
    {
      path: 'journal',
      component: () => import('@/views/finance/journal/'),
      name: 'Journal',
      meta: { title: '流水账' }
    },
    {
      path: 'profit',
      component: () => import('@/views/finance/profit/'),
      name: 'Profit',
      meta: { title: '利润表' }
    },
  ]
}

export default financeRouter
